package design.pattern.application.CommandAndChain;

import java.util.ArrayList;
import java.util.List;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2020-05-22 14:37:00
 */
public enum  CommandEnum {

    ls("design.pattern.application.CommandAndChain.LsCommand")
            ;
    private String value;
    private CommandEnum(String value){
        this.value = value;
    }
    public String getValue(){
        return this.value;
    }
    //返回所有的enum对象
    public static List<String> getNames(){
        CommandEnum[] commandEnums = CommandEnum.values();
        List<String> names = new ArrayList<>();
        for (CommandEnum commandEnum : commandEnums) {
            names.add(commandEnum.name());
        }
        return names;
    }

}
